import globals from "globals";
import jsLint from "@eslint/js";
import tsLint from "typescript-eslint";
import eslintConfigPrettier from "eslint-config-prettier";
import eslintPluginPrettierRecommended from "eslint-plugin-prettier/recommended";

export default tsLint.config({
  extends: [
    jsLint.configs.recommended,
    ...tsLint.configs.recommended,
    eslintConfigPrettier,
    eslintPluginPrettierRecommended,
  ],
  files: ["**/*.{js,ts,tsx}"],
  ignores: ["dist/**", "**/node_modules"],
  languageOptions: {
    ecmaVersion: 2024,
    globals: globals.browser,
  },
  plugins: {},
  rules: {
		indent: ['error', 'tab'],
		'linebreak-style': ['error', 'unix'],
		semi: ['error', 'always'],
    "prettier/prettier": "warn",
		'@typescript-eslint/no-unused-vars': [
			'warn',
			{
				vars: 'all',
				args: 'after-used',
				ignoreRestSiblings: false,
				argsIgnorePattern: '^_',
				varsIgnorePattern: '^_|^(h|fragment)$',
			},
		],
  },
});
